package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.SaleListGoods;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 杨林
 * @create 2023-01-28 16:11 星期六
 * description:
 */
public interface SaleListGoodsDao {
    /**
     * 获取商品销售的总数量
     * @param goodsId
     * @return
     */
    Integer getSumSaleGoods(@Param("goodsId") Integer goodsId);


    /**
     * 批量保存saleListGoods
     * @param saleListGoodsList
     */
    void bachSave(@Param("saleListGoodsList") List<SaleListGoods> saleListGoodsList);

    /**
     * 销售单商品信息
     * @param saleListId
     * @return
     */
    List<SaleListGoods> goodsList(@Param("saleListId") Integer saleListId);


    /**
     * 根据saleListId获取销售商品单商品信息
     * @param saleListId
     * @return
     */
    List<SaleListGoods> ifHasSaleListGoods(@Param("saleListId") Integer saleListId);
}
